﻿/*****************************************************************************  

 Version: 0.1
 Website: http://www.visuagile.com/
 
 Copyright (c) Yoganand R. All rights reserved.
 For continued development and updates, visit http://yogsbreath.net
 
 ******************************************************************************/

#region Imports

using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

using VisualAgile.IBLL;
using VisualAgile.IDAL;
using VisualAgile.Model;

#endregion


namespace VisualAgile.BLL
{
    public class LabelManager : BaseManager<Label>, ILabelManager
    {
        #region Properties

        public ILabelDao LabelDao { get; set; }

        #endregion

        protected override IBaseDao<Label> getBaseDAO()
        {
            return LabelDao;
        }

        /// <summary>
        /// Create a Iteration (the default value contains the return)
        /// </summary>
        /// <returns></returns>
        public Label NewLabel()
        {
            var Label = new Label();

            //System configuration can be used
            Label.CreateTime = DateTime.Now;
            Label.Date = DateTime.Now.ToShortDateString();            

            return Label;
        }

        /// <summary>
        /// Access to Label
        /// </summary>
        /// <param name="ProjectName">iteration Id</param>
        /// <returns></returns>
        public IList GetByIteration(string IterationID)
        {
            return LabelDao.FindByIteration(IterationID);
        }
    }
}
